package com.bangdream.michelia.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * @date on 2018/8/7 22:48
 * @email 909732184@qq.com
 */
public class TestBean implements Parcelable {
    int age;
    String Name;
    List<TeacherBean> data;

    class TeacherBean{
        String teacherName;
        int age;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.age);
        dest.writeString(this.Name);
        dest.writeList(this.data);
    }

    public TestBean() {
    }

    protected TestBean(Parcel in) {
        this.age = in.readInt();
        this.Name = in.readString();
        this.data = new ArrayList<TeacherBean>();
        in.readList(this.data, TeacherBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<TestBean> CREATOR = new Parcelable.Creator<TestBean>() {
        @Override
        public TestBean createFromParcel(Parcel source) {
            return new TestBean(source);
        }

        @Override
        public TestBean[] newArray(int size) {
            return new TestBean[size];
        }
    };
}
